package net.pdouglas.revisiondroid;

enum CounterState {
	UNCHANGED, BELOW10, NEGATIVE, POSITIVE, ABOVE10;
	
	static CounterState update(CounterState state, int count){
		int mins = count / 60;
		CounterState gen;
		if (mins >= 600)
			gen = ABOVE10;
		else if (mins >= 0) 
			gen = POSITIVE;
		else if (mins > -600)
			gen = NEGATIVE;
		else
			gen = BELOW10;
		if (gen == state) {
			gen = UNCHANGED;
		}
		return gen;
	}
}
